<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
        google.load("jquery", "1.3");
</script>
</head>

<body>
<script type="text/javascript" src="{$smarty.const.URL_JS}/JsHttpRequest.js"></script>
<script type="text/javascript" src="{$smarty.const.URL_JS}/niftycube.js"></script>
{literal}
<style type="text/css">
	ul#product-pictures-container li table {
		width: {/literal}{$smarty.const.CONF_PRDPICT_THUMBNAIL_SIZE+26}{literal};
		height: {/literal}{$smarty.const.CONF_PRDPICT_THUMBNAIL_SIZE+36}{literal};
	}
	ul#product-pictures-container li table td.img_container {
		height: {/literal}{$smarty.const.CONF_PRDPICT_THUMBNAIL_SIZE+6}{literal};
	}
	.container-simple-options-obertka {
		width: 800px;
		display: block;
		margin-bottom: 5px;
		height: 24px;
	}
	.container_left_side {
		float: left;
		width: 150px;
	}
	.container_right_side {
		float: right;
		width: 650px;
	}
	.container_full_side {
		float: left;
		width: inherit;
	}
	input:-webkit-input-placeholder, textarea:-webkit-input-placeholder {
   	color: #CCC;
	}
	input:-moz-placeholder, textarea:-moz-placeholder {
   	color: #CCC;
	}
	fieldset {
		width: 795px; 
		padding-left: 5px; 
		padding-right: 0px; 
		margin-right: 0px; 
		margin-left: 0px;
	}
	fieldset .container-simple-options-obertka {
		width: 790px;
	}
	fieldset .container-simple-options-obertka .container_right_side {
		width: 634px;
	}
	.picture_lable {
		height: 18px; 
		margin-top: 0px; 
		padding-top: 2px; 
		padding-left: 5px; 
		padding-right: 5px;
		border-bottom: #999999 thin solid;
		border-top: #999999 thin solid;
		font-size: 12px;
		background-image: linear-gradient(top, rgb(255,255,255) 0%, rgb(228,233,243) 100%);
		background-image: -o-linear-gradient(top, rgb(255,255,255) 0%, rgb(228,233,243) 100%);
		background-image: -moz-linear-gradient(top, rgb(255,255,255) 0%, rgb(228,233,243) 100%);
		background-image: -webkit-linear-gradient(top, rgb(255,255,255) 0%, rgb(228,233,243) 100%);
		background-image: -ms-linear-gradient(top, rgb(255,255,255) 0%, rgb(228,233,243) 100%);
		
		background-image: -webkit-gradient(
			linear,
			left top,
			left bottom,
			color-stop(0, rgb(255,255,255)),
			color-stop(1, rgb(228,233,243))
		);
		float: left;
	}
</style>
{/literal}
{include file="backend/tiny_mce_config.html"}

<script type="text/javascript">
	translate.prdset_msg_choosen_relatedproduct = '{"prdset_msg_choosen_relatedproduct"|transcape}';
	translate.prdset_msg_confirm_pict_delete = '{"prdset_msg_confirm_pict_delete"|transcape}';
	translate.prdset_btn_delete_pict = '{"prdset_btn_delete_pict"|transcape}';
	translate.prdset_btn_setdefault_pict = '{"prdset_btn_setdefault_pict"|transcape}';
	translate.prdset_msg_loading_products = '{"prdset_msg_loading_products"|transcape}';
	translate.prdset_btn_hide_products = '{"prdset_btn_hide_products"|transcape}';
	translate.prdset_btn_next_products = '{"prdset_btn_next_products"|transcape}';
	translate.prdset_btn_prev_products = '{"prdset_btn_prev_products"|transcape}';
	translate.btn_delete = '{"btn_delete"|transcape}';
	translate.str_image_not_uploaded = '{lbl_str_image_not_uploaded}';
</script>

<h1 class="breadcrumbs"><a href='{"ukey=categorygoods&productID="|set_query_html}'>{'pgn_products_categories'|transcape}</a>
&raquo;
{if $product.productID}
{$CurrentDivision.name|translate}: {$product.name|escape:'html'}
{else}
{lbl_prdset_addproduct}
{/if}
</h1>

{$MessageBlock}

<div>
<!-- @FIXME Эту мудотень изменить. Такому изварту тут не место -->
<ul id="edmod">
	<li class="tab" id="tab-simple-options"><a href='#simple' id="lnk-simple-options">{lbl_prdset_tab_simple}</a></li>
	<li class="tab" id="tab-description-options"><a href='#description' id="lnk-description-options">Доп. описание</a></li>
	<li class="tab" id="tab-advanced-options"><a href='#advanced' id="lnk-advanced-options">{lbl_prdset_tab_advanced}</a></li>
	<li class="tab" id="tab-customparams-options"><a href='#customparams' id="lnk-custom-params">{lbl_prdset_tab_customparams}</a></li>
</ul>
<!-- Конец мудотени для изменения -->
</div>
<br />

<form enctype="multipart/form-data" action="{''|set_query_html}" method="post" name="MainForm" id="product-settings-form" target="_self">
<input type="hidden" name="action" id="action-name" value="save_product" />
<input type="hidden" name="productID" id="product-id" value="{$product.productID|escape:'html'}" />
<input type="hidden" name="make_slug" id="make-slug-id" value="{if $product.productID<=0}1{/if}" />

<div id="container-simple-options" style="display:none;">
	<div class="container-simple-options-obertka">
		<div class="container_left_side">Наименование:</div>
		<div class="container_right_side"><input name="name_ru" value="{$product.name}" placeholder="Наименование" style="width:100%" required /></div>
	</div>
	<div class="container-simple-options-obertka">
		<div class="container_left_side">Цена</div>
		<div class="container_right_side"><input name="Price" value="{$product.Price|escape:'html'}" size="6" type="text" style="text-align:right;" placeholder="Введите цену" />{$default_currency.currency_iso_3}</div>
	</div>
	<div class="container-simple-options-obertka">
		<div class="container_left_side">Оптовая Цена</div>
		<div class="container_right_side"><input name="price_opt" value="{$product.price_opt|escape:'html'}" size="6" type="text" style="text-align:right;" placeholder="Введите цену" />{$default_currency.currency_iso_3}</div>
	</div>
{if $smarty.const.CONF_CHECKSTOCK eq 1}
	<div class="container-simple-options-obertka">
		<div class="container_left_side">На складе</div>
		<div class="container_right_side"><input type="text" name="in_stock" value="{$is|escape:'html'}" size="6" placeholder="0" /></div>
	</div>
{/if}
	<div class="container-simple-options-obertka">
		<div class="container_left_side">Категория:</div>
		<div class="container_right_side">
			<div id="product-category-name">
				{foreach from=$product_category.calculated_path item=_crumb name=_frcrumbs}
				{if $_crumb.categoryID ne 1 && $product_category.categoryID ne $_crumb.categoryID}{$_crumb.name|escape:'html'}&nbsp;&gt;{/if}
				{/foreach}
				{$product_category.name|escape:'html'}
			</div>
			<input name="categoryID" id="product-category-categoryID" value="{$product_category.categoryID|escape:'html'}" type="hidden" />
			<a href="#choose_category" id="choose-parentcategory-handler">{lbl_prdset_lnk_choose_parentcategory}</a>
		</div>
	</div>
	<div class="container-simple-options-obertka">
		<div class="container_full_side">Описание</div>
		<div class="container_full_side">{html_textarea name="description" values=$product rows=3 cols=40 style="width:100%" class="mceEditor" id="prd-description"}</div>
	</div>
	<div class="container-simple-options-obertka">
		<div class="container_full_side">Краткое описание</div>
		<div class="container_full_side">{html_textarea name="brief_description" values=$product rows=3 cols=40 style="width:100%" class="mceEditor"}</div>
	</div>
	<div class="container-simple-options-obertka">
		<div class="container_full_side">Тэги <small>(разделитель - запятая)</small>:</div>
		<div class="container_full_side">
			{html_text name="tags" id="tags" values=$product_tags style="width:100%"}
			{$tags_cloud}
		</div>
	</div>
	<fieldset>
		<legend>Мета</legend>
		<div class="container-simple-options-obertka">
			<div class="container_left_side">Заголовок страницы:</div>
			<div class="container_right_side">
				<input type="text" lang="ru" style="width:100%" value="{$product.meta_title_ru}" name="meta_title_ru" placeholder="Произвольный заголовок" />
			</div>
		</div>
		<div class="container-simple-options-obertka">
			<div class="container_left_side">Ключевые слова:</div>
			<div class="container_right_side">
				<input type="text" lang="ru" style="width:100%" value="{$product.meta_keywords_ru}" name="meta_keywords_ru" placeholder="Ключевые слова через запятую" />
			</div>
		</div>
		<div class="container-simple-options-obertka">
			<div class="container_left_side">Описание:</div>
			<div class="container_right_side">
				<textarea lang="ru" class="prd_metadescription" style="width:100%;" cols="35" rows="3" name="meta_description_ru" placeholder="Произвольное описание страницы">{$product.meta_description_ru}</textarea>
			</div>
		</div>
	</fieldset>
	<fieldset>
		<legend>Фотографии продуктов</legend>
		<ul type="none">
			<li style="list-style-type:none">{lbl_str_drag_and_drop_to_change_order}</li>
			<li style="list-style-type:none">{lbl_str_first_image_is_main}</li>
		</ul>
		<div>
			<div class="container-simple-options-obertka">
				<div class="picture_lable">
				<div style="width: 285px; float: left;">Изображения<input name="__action" value="_update_pictures_priority" type="hidden" /></div>
				<div style="width: 190px; float: left;">Маленькая фотография</div>
				<div style="width: 110px; float: left;">Фотография</div>
				<div style="width: 195px; float: left;">Большая фотография</div>
				</div>
			</div>
		</div>
<!-- Надо как-то заменить эту сраную ебань! -->
		<table cellpadding="0" cellspacing="0" width="100%" id="product-pictures-container" class="grid" trheight="{$smarty.const.CONF_PRDPICT_THUMBNAIL_SIZE}">
				
				{section loop=$pictures name=i}
				<tbody class="dragable">
				<tr id="picture-container-{$pictures[i].photoID}" height="{$smarty.const.CONF_PRDPICT_THUMBNAIL_SIZE}" class="{if $smarty.section.i.first}gridline1{else}gridline1{/if}">
					<td class="img_container handle" title="{lbl_str_drag_and_drop_to_change_order}">
						{if $pictures[i].thumbnail_exists == 1}
							<img src="{$smarty.const.URL_PRODUCTS_PICTURES}/{$pictures[i].thumbnail|escape:'url'}" />
						{else}
							<div class="error_block">{lbl_str_image_not_uploaded}</div>
						{/if}
						</td>
					<td style="padding-left:10px;" class="handle">
					{if $pictures[i].thumbnail_exists == 1}
						{$pictures[i].thumbnail_picture.file}<br>
						{$pictures[i].thumbnail_picture.width}&times;{$pictures[i].thumbnail_picture.height}&nbsp;px<br>
						{$pictures[i].thumbnail_picture.size}
					{else}
						{$pictures[i].thumbnail_picture.file}<br>
						{lbl_str_image_not_uploaded}
					{/if}
					</td> 
					<td>
					{if $pictures[i].picture_exists == 1}	
						<a href="{$smarty.const.URL_PRODUCTS_PICTURES}/{$pictures[i].large_picture.file|escape:'url'}" class="new_window bluehref" wnd_width="{$pictures[i].large_picture.width}" wnd_height="{$pictures[i].large_picture.height}">
						{$pictures[i].large_picture.file}</a>
						{$pictures[i].large_picture.width}&times;{$pictures[i].large_picture.height}&nbsp;px<br>
						{$pictures[i].large_picture.size}
					{else}
						{$pictures[i].large_picture.file}<br>
						{lbl_str_image_not_uploaded}
					{/if}
					</td>					
					<td>
					{if $pictures[i].enlarged_exists == 1}	
						<a href="{$smarty.const.URL_PRODUCTS_PICTURES}/{$pictures[i].enlarged_picture.file|escape:'url'}" class="new_window bluehref" wnd_width="{$pictures[i].enlarged_picture.width}" wnd_height="{$pictures[i].enlarged_picture.height}">
						{$pictures[i].enlarged_picture.file}</a>
						{$pictures[i].enlarged_picture.width}&times;{$pictures[i].enlarged_picture.height}&nbsp;px<br>
						{$pictures[i].enlarged_picture.size}
					{else}
						{$pictures[i].enlarged_picture.file}<br>
						{lbl_str_image_not_uploaded}
					{/if}
					</td>
					<td>
						<a href="#delete_picture" class="delete_picture_handlers bluehref" photoID="{$pictures[i].photoID}"><img src="./images/remove.gif" alt="{lbl_prdset_btn_delete_pict|escape:'html'}" /></a>
						<input type="hidden" class="field_priority" name="priority_{$pictures[i].photoID}" value="{$smarty.section.i.index}" />
					</td>
				</tr>
				</tbody>
				{/section}
				</table>
<!-- Конец сраной ебани, которую надо заменить -->		
	</fieldset>

	<br clear="all" />
	<table width="50%">
	<tr>
		<td colspan="2">
	<!-- Pictures -->
			<br />
			<fieldset>
				
				<table  cellpadding="0" cellspacing="0" width="100%" class="grid">
				<tbody class="gridsfooter">
				<tr id="upload-picture-container" style="clear: left; white-space: nowrap;"  >
				<td colspan="4">
				<br>
				<fieldset>
					<legend>{"imm_upload_link"|translate}&nbsp;</legend>
					<input id="set-default" name="set_default" type="hidden" value="{if $smarty.section.i.total}0{else}1{/if}" />
					<input id="upload-priority" name="upload_picture_priority" type="hidden" value="1" />
					<input id="field-skip-image-upload" name="skip_image_upload" type="hidden" value="0" />
					
					<ul type="none">					
						<li style="margin:10px 10px;list-style-type:none"><input type="radio" name="image_source" value="file" id="image-source-file" checked />&nbsp;<input id="upload-browse" name="upload_picture" type="file"size="45" /></li>
						<li style="margin:10px 10px;list-style-type:none"><input type="radio" name="image_source" value="url" id="image-source-url"  />&nbsp;<input id="upload-url" name="upload_picture_url" type="text" value="URL" disabled size="59" class="bluehref"/></li>
					</ul>
					<img src="images_common/processing.gif" id="processing-image" style="display:none;" />
					<input id="do-upload-handler" value="{'btn_upload'|transcape}" type="button" class="button" />
					</p>
				</fieldset>
				</td>
				</tr>
				</tbody>
				</table>
			</fieldset>
			{include file="backend/sortable_table.html" table_id="product-pictures-container" action_name="update_pictures_priority" action_id="action-name" default_action="save_product"}
	</td>
</tr>
</table>
</div>
<!-- Дополнительное описание -->
<div id="container-description-options" style="display:none;">
	<table style="width: 100%;">
	<tr>
		<td width="1%" nowrap><strong>Обзор:</strong></td>
		<td>
			{html_textarea name="custom_field_1" values=$product rows=3 cols=40 style="width:100%" class="mceEditor"}
		</td>
	</tr>
	<tr>
		<td width="1%" nowrap><strong>Технические данные:</strong></td>
		<td>
			{html_textarea name="custom_field_2" values=$product rows=3 cols=40 style="width:100%" class="mceEditor"}
		</td>
	</tr>
	</table>
</div>
<!-- Дополнительное опции -->
<div id="container-advanced-options" style="display:none;">
	<table>
{if $product.date_added ne ''}
		<tr>
			<td>{lbl_prdset_date_added}: </td>
			<td><strong>{$product.date_added}</strong></td>
		</tr>
{/if}
	
{if $product.date_modified ne ''}
		<tr>
			<td>{lbl_prdset_date_modified}: </td>
			<td><strong>{$product.date_modified}</strong></td>
		</tr>
{/if}

		<tr>
			<td>{lbl_prdset_product_code}: </td>
			<td><input type="text" name="product_code" value="{$product.product_code|escape:'html'}" /></td>
		</tr>

		<tr>
			<td>{lbl_prdset_slug}: </td>
			<td><input type="text" name="slug" value="{$product.slug|escape:'html'}" /></td>
		</tr>

		<tr>
			<td>{lbl_prdset_str_invisible}: </td>
			<td><input type="checkbox" name="product_invisible" value="1" {if !$product.enabled}checked{/if} /></td>
		</tr>

		<tr>
			<td>{lbl_prdset_str_ordering_available}: </td>
			<td><input type="checkbox" name="ordering_available" value="1" {if $product.ordering_available}checked{/if} /></td>
		</tr>

		<tr>
			<td>{"tax_type"|translate}: </td>
			<td>
				<select name='classID'>
					<option value='null'>{"str_not_defined"|translate}</option>
				{section name=j loop=$tax_classes}
					<option value="{$tax_classes[j].classID}"{if $product.classID eq $tax_classes[j].classID} selected="selected"{/if}>
					{$tax_classes[j].name|escape:'html'}
					</option>
				{/section}
				</select>
			</td>
		</tr>

{if $smarty.const.CONF_VKONTAKTE_ENABLED eq 1 && false}
		<tr>
			<td>{lbl_prdset_vkontakte_update_date}: </td>
			<td>{if $product.vkontakte_update_date}<strong style="background-image:url('./images_common/vkontakte/vkontakte.ico');background-position:left center;background-repeat:no-repeat;padding:20px;">{$product.vkontakte_update_timestamp}</strong>{else}&mdash;{/if}</td>
		</tr>
{/if}

{if $smarty.const.CONF_1C_ON eq 1}
		<tr>
			<td>{lbl_prdset_1c_sync}: </td>
			<td>{if $product.id_1c}<strong style="background-image:url('./images_common/1c.png');background-position:left center;background-repeat:no-repeat;padding:20px;">{$product.id_1c}</strong>{else}{lbl_str_no_result}{/if}</td>
		</tr>
{/if}

{if $smarty.get.productID ne ''}
		<tr>
			<td>{"prdset_product_rating"|translate}: </td>
			<td><input type="text" name="customers_rating" value="{$product.customers_rating|escape:'html'}" /></td>
		</tr>
		<tr>
			<td>{"prdset_product_votes"|translate}: </td>
			<td>{$product.customer_votes}</td>
		</tr>
		<tr>
			<td>{"rep_views_count"|translate}: </td>
			<td>{$product.viewed_times}</td>
		</tr>
		<tr>
			<td>{"rep_add2cart_count"|translate}: </td>
			<td>{$product.add2cart_counter}</td>
		</tr>
		<tr>
			<td>{"prdset_product_sold"|translate}: </td>
			<td>{$product.items_sold}</td>
		</tr>

{/if}

		<tr>
			<td>{"prdset_product_listprice"|translate}: 
			<div class="field_descr">{"str_number_only"|translate}</div></td>
			<td><input name="list_price" value="{$product.list_price|escape:'html'}" size="6" type="text" style="text-align:right;" /> {$default_currency.currency_iso_3}</td>
		</tr>
		
		<tr>
			<td>{"prdset_handling_charge"|translate}: </td>
			<td><input name="shipping_freight" value="{$product.shipping_freight|escape:'html'}" size="6" type="text" style="text-align:right;" /> {$default_currency.currency_iso_3}</td>
		</tr>
		
		<tr>
			<td>{"prdset_weight"|translate}: </td>
			<td><input name='weight' value='{$product.weight|escape:"html"}' size="6" type="text" style="text-align:right;" /> {$smarty.const.CONF_WEIGHT_UNIT}</td>
		</tr>

		<tr>
			<td>{"prdset_free_shipping"|translate}: 
			<div class="field_descr">{lbl_prdset_freeshipping_description}</div></td>
			<td><input type="checkbox" name='free_shipping'{if $product.free_shipping} checked="checked"{/if} value='1' /></td>
		</tr>
		
		<tr>
			<td>{"prdset_min_qunatity_to_order"|translate}: </td>
			<td><input type="text" name='min_order_amount' value='{$product.min_order_amount|escape:"html"}' /></td>
		</tr>
		
		<tr>
			<td>Группировка в категории: </td>
			<td><input type="text" name='category_group' value='{$product.category_group|escape:"html"}' /></td>
		</tr>
		
		<tr>
			<td>{lbl_str_sort_order}: </td>
			<td><input type="text" name='sort_order' value='{$product.sort_order|escape:"html"}' /></td>
		</tr>
		<tr>
			<td colspan="2">&nbsp;</td>
		</tr>
		<tr>
			<td valign="top">{"str_related_items"|translate}: </td>
			<td>
				<div id="related-products-container">
				{section name=j loop=$RelatedItems}
					<div id="related-product-{$RelatedItems[j].productID|escape:'html'}">
						{$RelatedItems[j].name|escape:'html'}
						<input name="related_products[]" value="{$RelatedItems[j].productID|escape:'html'}" type="hidden" />
						<a href='#remove_relatedproduct' class="remove_relatedproduct_handler" productID="{$RelatedItems[j].productID|escape:'html'}"><img src="images/remove.gif" border="0" hspace="6" alt="{"btn_delete"|translate}" /></a>
					</div>
				{/section}
				</div>
				<div><a href="#add_related_product" id="add-related-product-handler">{"btn_add"|transcape}</a></div>
			</td>
		</tr>
		<tr>
			<td colspan="2">&nbsp;</td>
		</tr>
		<tr>
			<td valign="top">{"prdset_product_extra_categories"|translate}: </td>
			<td>
				<div id="appendedcategories-block">
				{section name=j loop=$appended_categories}
					<div id="appended-category-{$appended_categories[j].categoryID|escape:'html'}">
						{foreach from=$appended_categories[j].calculated_path item=_crumb name=_frcrumbs}
						{if $_crumb.categoryID ne 1 && $appended_categories[j].categoryID ne $_crumb.categoryID}{$_crumb.name|escape:'html'}&nbsp;&gt;{/if}
						{/foreach}
						{$appended_categories[j].category_name}
						<input name="appended_categories[]" value="{$appended_categories[j].categoryID|escape:'html'}" type="hidden" />
						<a href='#remove_appendedcategory' class="remove_appendedcategory_handler" categoryID="{$appended_categories[j].categoryID|escape:'html'}"><img src="images/remove.gif" border="0" hspace="6" alt="{"btn_delete"|translate}" /></a>
					</div>
				{/section}
				</div>
				<div>
					<a href="#add_appended_parent" id="add-appended-parent-handler">{"btn_add"|transcape}</a>
				</div>
			</td>
		</tr>
	</table>
	<br />
	<fieldset style="width:60%;">
		<legend>
			<input type="checkbox" name="ProductIsProgram" value="1" id="product-isprogram-handler"{if $product.eproduct_filename ne ''} checked="checked"{/if} />
			<label for="product-isprogram-handler">{"prdset_product_is_downloadable"|translate}</label>
		</legend>
		
		<div id='FileNameTable'{if $product.eproduct_filename eq ''} style="display:none;"{/if}>
		<table cellspacing="5">
			<tr>
				<td valign="top">{"prdset_product_filename"|translate}: </td>
				<td>
					<input type="file" name="eproduct_filename" value="{$product.eproduct_filename|escape:'html'}" /><br />
					{if $product.eproduct_exists eq 1}{$product.eproduct_filename}{if $product.eproduct_filesize} ({$product.eproduct_filesize_str|replace:' ':'&nbsp;'}){/if}{else}{"str_file_is_not_uploaded"|translate}{/if}
				</td>
			</tr>
			<tr>
				<td valign="top">{"prdset_download_is_available_for"|translate}: </td>
				<td>
					<select name="eproduct_available_days">
					{foreach item='value' from=$eproduct_available_days}
						<option value='{$value|escape:"html"}'{if $product.eproduct_available_days eq $value} selected="selected"{/if}>{$value|escape:"html"}</option>
					{/foreach}
					</select>
				</td>
			</tr>
			<tr>
				<td valign="top">{"prdset_download_max_number_allowed"|translate}: </td>
				<td><input type="text" size="4" name="eproduct_download_times" value="{$product.eproduct_download_times|escape:'html'}" /></td>
			</tr>
		</table>
		</div>
	</fieldset>
</div>

<div id="container-customparams-options" style="display:none;">
		
<!-- Extra options -->
	{if $options != null}
	
	<table cellpadding="4">
	{foreach from=$options item=option name=fe_options}
	{assign var="option_row" value=$option.option_row}
	{assign var="value_row" value=$option.option_value}
	{assign var="ValueCount" value=$option.value_count}
		<tr>
			<td align="left"><b>{$option_row.name|escape:'html'}</b></td>
			<td>
				<input name='option_radio_type_{$option_row.optionID}' id='opt_undef_{$option_row.optionID}' type='radio' value="UN_DEFINED" {if $value_row.option_value eq '' and $value_row.option_type eq 0} checked="checked"{/if} />
			</td>
			<td>
				<label for="opt_undef_{$option_row.optionID}">{"str_not_defined"|translate}</label>
			</td>
		</tr>
		<tr> 
			<td>&nbsp;</td>
			<td valign='top'> 
				<input name='option_radio_type_{$option_row.optionID}' id="opt_any_{$option_row.optionID}" type='radio' value="ANY_VALUE" {if $value_row.option_type eq 0 && $value_row.option_value ne ''} checked="checked"{/if} /> 
			</td>
			<td>
				<label for="opt_any_{$option_row.optionID}">{"prdset_custom_value"|translate} </label>
				{html_text dbfield="option_value" name="option_value_%lang%_`$option_row.optionID`" values=$value_row style="width:250px;"}
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td valign='top'>
				<input name='option_radio_type_{$option_row.optionID}' id="opt_nval_{$option_row.optionID}" type='radio' value="N_VALUES" {if $value_row.option_type eq 1} checked="checked"{/if} />
			</td>
			<td>
				<label for="opt_nval_{$option_row.optionID}">
					{"prdset_selectable_from_values"|translate} (<span id="option-values-num-{$option_row.optionID}">{$ValueCount}</span> {"prdset_option_value_variants"|translate})<br />
					<a name="option_value_configurator_{$option_row.optionID}" optionID='{$option_row.optionID}' href='{"?ukey=option_value_configurator&optionID=`$option_row.optionID`&productID=`$smarty.get.productID`"|set_query_html}' onclick="return optionsSettingsManager.showSettings(this);">{"prdset_choose_selectable_option_values"|translate}...</a>
				</label>
			</td>
		</tr>
		{if !$smarty.foreach.fe_options.last}
		<tr>
			<td colspan="3"><hr width="100%" /></td>
		</tr>
		{/if}
	{/foreach}
	</table>
	{else}
		<p>{lbl_prdopt_no_product_options}</p>
	{/if}
	<p><a href="{"?did=18"|set_query}">{lbl_prdopt_manage_product_options}</a></p>
</div>
{if $smarty.const.CONF_CHECKSTOCK ne 1}<input type="hidden" name="in_stock" value="{$is|escape:'html'}" />{/if}
<br />
<input type="submit" class="button" id="btn-save-product" name="save_product" value="{'btn_save'|transcape}" />
</form>

<script type="text/javascript" src="{$smarty.const.URL_JS}/product_settings.js"></script>
<script type="text/javascript">
	var product_id = "{$product.productID}";
	var conf_full_shop_url = "{$smarty.const.CONF_FULL_SHOP_URL|escape:'html'}";
{literal}
	if(getCookie('prdset_tab') && getCookie('prdset_prd_id') == product_id){
	
		prdset_selectTab(getCookie('prdset_tab'));
	}else{
		
		prdset_selectTab('simple');
	}
	setCookie('prdset_prd_id', product_id);
	ProductIsProgramHandler();
{/literal}
</script>
<script type='text/javascript' src='{$smarty.const.URL_JS}/widget_checkout.js'></script>
</body>
</html>
